home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // $RCSfile: projLightUI.mel $
- //
- // $Source: /vobs/aw/Maya/src/RenderUISlice/UI/projectLight/projLightUI.mel $
- //
- // $Locker:$
- //
- // $Author: ghooper $
- // $Revision: /main/6 $
- // $Date: 1997/12/08 21:54:23 $
- //
- // Class: projLightUI
- //
- // Original Author: Sanjay Bakshi
- //
- // Description:
- // Create the UI for the projectLightEditor. This should
- // be called from projectLightPanel.
- //
-
-
-
- global proc projLightUI(string $projLightEditor)
- {
- // string $windowName = $projLightEditor + "UI";
- // window $windowName;
-
- setUITemplate -pushTemplate DefaultTemplate;
- columnLayout b;
-
- button -l "light" -c
- ("projectLightEditor -e -light `ls -selection`" + $projLightEditor) lightButton;
- // button -l "blockers" -c
- // ("projectLightEditor -e -blockers `ls -selection`" + $projLightEditor) blockersButton;
-
- button -l "blockers" -c ("findGeomForLightProj -blockers " + $projLightEditor) blockersButton;
-
- button -l "receivers" -c ("findGeomForLightProj -receivers " + $projLightEditor) receiversButton;
-
- checkBox -l "shadow contours" -cc
- ("projectLightEditor -e -shadowContours #1 " + $projLightEditor)
- shadowContourBox;
-
- checkBox -l "shadow polygons" -cc
- ("projectLightEditor -e -shadowPolygons #1 " + $projLightEditor)
- shadowPolygonsBox;
-
- checkBox -l "illumReg contours" -cc
- ("projectLightEditor -e -illumRegContours #1 " + $projLightEditor)
- illumRegContoursBox;
-
- checkBox -l "illumReg polygons" -cc
- ("projectLightEditor -e -illumRegPolygons #1 " + $projLightEditor)
- illumRegPolygonsBox;
-
- checkBox -l "illumReg texture" -cc
- ("projectLightEditor -e -illumRegTexture #1 " + $projLightEditor)
- illumRegTextureBox;
-
- intSliderGrp -l "resolution" -min 10 -max 1000 -v 100 -field true -cc
- ("projectLightEditor -e -resolution #1 " + $projLightEditor)
- resolutionGrp;
-
- intSliderGrp -l "subdivisions" -min 1 -max 20 -v 4 -field true -cc
- ("projectLightEditor -e -subdivisions #1 " + $projLightEditor)
- subdivisionsGrp;
-
- checkBox -l "continuous update"
- -onCommand ("projectLightEditor -e -continuousUpdate 1 " + $projLightEditor)
- -offCommand ("projectLightEditor -e -continuousUpdate 0 " + $projLightEditor)
- continuousUpdateBox;
-
- checkBox -l "idle event update"
- -onCommand ("projectLightEditor -e -idleEventUpdate 1 " + $projLightEditor)
- -offCommand ("projectLightEditor -e -idleEventUpdate 0 " + $projLightEditor)
- idleEventUpdateBox;
-
- button -l "reset" -c
- ("projectLightEditor -e -reset " + $projLightEditor + "; projLightUIupdate " + $projLightEditor) resetButton;
-
- projLightUIupdate($projLightEditor);
-
- setUITemplate -popTemplate;
-
- };
-
- global proc projLightUIupdate(string $projLightEditor)
- {
- checkBox -e -v
- `projectLightEditor -q -shadowContours $projLightEditor`
- shadowContourBox;
-
- checkBox -e -v
- `projectLightEditor -q -shadowPolygons $projLightEditor`
- shadowPolygonsBox;
-
- checkBox -e -v
- `projectLightEditor -q -illumRegContours $projLightEditor`
- illumRegContoursBox;
-
- checkBox -e -v
- `projectLightEditor -q -illumRegPolygons $projLightEditor`
- illumRegPolygonsBox;
-
- checkBox -e -v
- `projectLightEditor -q -illumRegTexture $projLightEditor`
- illumRegTextureBox;
-
- intSliderGrp -e -v
- `projectLightEditor -q -resolution $projLightEditor`
- resolutionGrp;
-
- intSliderGrp -e -v
- `projectLightEditor -q -subdivisions $projLightEditor`
- subdivisionsGrp;
-
- checkBox -e -v
- `projectLightEditor -q -continuousUpdate $projLightEditor`
- continuousUpdateBox;
-
- checkBox -e -v
- `projectLightEditor -q -idleEventUpdate $projLightEditor`
- idleEventUpdateBox;
- };
-
- global proc findGeomForLightProj(string $flag, string $editorName)
- {
- string $selList[] = `ls -selection`;
-
- string $command = "projectLightEditor -e ";
-
- for ($item in $selList) {
- $command += ($flag + " " + $item + " ");
- }
-
- $command += $editorName;
- evalEcho $command;
- };
-